<?php
if (isset($_POST['n']) && !empty($_POST['n'])){
    include '../c/config.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $qname=addslashes(trim($_POST['n']));
    $query=$mysqli->query("SELECT id,name FROM qdui where name like '%".$qname."%'  limit 0,20 ");
    $qiuList=array();
    while ($list=$query->fetch_assoc()){
        $qiuList[$list['id']]=$list['name'];
    }
    $mysqli->close();
    echo json_encode(array('n'=>$qiuList));
}

